#ifndef _AHCI_H
#define _AHCI_H

#include <hal/ahci/hba.h>

void ahci_init();

void ahci_list_device();

u32 ahci_get_port_usage();

hba_port_t* ahci_get_port(u32 index);

void ahci_parse_dev_info(hba_dev_t* dev, u16* data);

void ahci_parsestr(char* str, u16* reg_start, int size_word);

int ahci_try_send(hba_port_t* port, int slot);

void ahci_post(hba_port_t* port, hba_cmds_t* state, int slot);

#endif /* _AHCI_H */